$(function () {
    fandAll();
})

function fandAll() {


    let data=myAjax("/company/findAll","","get");
    setData(data.list);
}

function setData(data) {
    let html='';
        html +='   <tr>\n' +//字符串拼接
            '            <td>'+data.id+'</td>\n' +
            '            <td><img src="'+data.logo+'" width="20px" height="20px"></td>\n' +
            '            <td>'+data.email+'</td>\n' +
            '            <td>'+data.hotline+'</td>\n' +
            '            <td>'+data.address+'</td>\n' +
            '            <td>'+data.phone+'</td>\n' +
            '            <td>'+data.tel+'</td>\n' +
            '            <td>'+data.landline+'</td>\n' +
            '            <td><input type="button" value="编辑" onclick="updatabyid('+data.id+')"></td>\n' +
            '        </tr>';
    $("#companyFindAll").html(html);
}

function updatabyid(id) {
    localStorage.setItem("companyid",id);
    $('#reght').load('../back/company/companyUpdate.html');
}